package com.z.controller;

import com.z.pojo.Goods;
import com.z.pojo.Users;
import com.z.service.UsersService;
import com.z.service.impl.UsersServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/updateuid")
public class UsersInfoServlet extends HttpServlet {
    private UsersService gs = new UsersServiceImpl();

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String uid = req.getParameter("uid");
        Users users = gs.selectByuid(Integer.parseInt(uid));
        req.setAttribute("users", users);
        req.getRequestDispatcher("/admin/manage/user-moddify.jsp").forward(req,resp);
    }
}
